import request from "@/utils/request";
// 规格列表
export function specList(query) {
  return request({
    url: "/commodity/spec/specList",
    method: "get",
    params: query,
  });
}
// 添加规格
export function specAdd(data) {
  return request({
    url: "/commodity/spec/add",
    method: "post",
    data,
  });
}
// 删除规格
export function delSpec(deptId) {
  return request({
    url: "/commodity/spec/remove/" + deptId,
    method: "delete",
  });
}
//查询详情
export function getSpec(id) {
  return request({
    url: "/commodity/spec/getSpecInfo/" + id,
    method: "get",
  });
}
// 更新规格
export function updateSpec(data) {
  return request({
    url: "/commodity/spec/edit",
    method: "post",
    data,
  });
}
//更新排序
export function changeSort(data) {
  return request({
    url: "/commodity/spec/changeSort",
    method: "put",
    data,
  });
}
// 商品分类
export function showAllCategoryPriList() {
  return request({
    url: "/commodity/category/showAllCategoryPriList",
    method: "get",
  });
}
